home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / SCRNSCAN.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  86 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _ScreenScan( nLine, cText, nType, cChar ) --> xRetVal
  8.  
  9. PARAMETERS:
  10.  
  11. nLine : Screen Line to scan for text Default is Cursor Line
  12. cText : Text to scan for (Required and CASE SENSITIVE!)
  13. nType : Type of operation to perform
  14. cChar : Delimiter character
  15.  
  16. SHORT:
  17.  
  18. Scan screen to locate or extract text.
  19.  
  20. DESCRIPTION:
  21.  
  22. _ScreenScan() operates in one of three ways.  First, it can scan the screen
  23. and attempt to locate spcified text and return logical TRUE or FALSE
  24. indicating such.  Second, it can, in lieu of a logical value, return the
  25. row/col coordinates of the located text in an array.  And thirdly, it can
  26. extract the text in which the specified token was found.
  27.  
  28. nType Values:
  29.  
  30. 1 - Scan and Return TRUE if text exists in specified coordinates or FALSE
  31. otherwise. (DEFAULT)
  32.  
  33. 2 - Scan and Return the row/col coordinates of the located text in an array.
  34.  
  35. 3 - Extract the located text from the specified area, using cChar as
  36. delimiter.
  37.  
  38. The Delimiter Character (cChar) is valid only with option 3 from the above.
  39. The default delimiter is a SPACE.
  40.  
  41. NOTE:
  42.  
  43.  
  44.  
  45. EXAMPLE:
  46.  
  47. Line 5 of screen contains:
  48.  
  49. ... "THE FILE NAME IS: S:\POWER\GLORY\FOREVER\AMEN.DAT" ...
  50.  
  51. Then:
  52.  
  53. #define K_TORF    1
  54. #define K_POS     2
  55. #define K_EXTRACT 3
  56.  
  57. _ScreenScan( 5, '\', K_EXTRACT, ' ')
  58.  
  59. This usage will return the file name with path from the screen by telling
  60. the function to look for a backslash and extracting text using SPACE as
  61. a delimiting char.
  62.  
  63. BEGIN OR END OF STRING ALWAYS = DELIMIT CHAR
  64.  
  65. Extract "HOWDY" delimited by SPACE.  All three of the following would
  66. work just fine:
  67.  
  68. " HOWDY "   - All three of these are essentially equivelent as
  69. " HOWDY"    - far as extracting the text with a delimiter is
  70. "HOWDY "    - concerned.
  71.  
  72. In addition to scanning a particular screen line, you can also scan the
  73. entire screen.  Passing a value of -1 in nLine causes the function to scan
  74. all lines for the given text  stopping on the first occurance of a match.
  75.  
  76. In the above example,
  77.  
  78. _ScreenScan( -1, 'AMEN.DAT', K_POS)
  79.  
  80. would return an array with
  81.  
  82. Element[1] = 5
  83. Element[2] = 42 (or wherever it happens to be)
  84.  
  85. ******************************************************************************/
  86.